home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DTP
/
DTP_TEX
/
H220.ZIP
/
ITRNS211.ZIP
/
SRC
/
MAKEFILE.GCC
< prev
next >
Wrap
Text File
|
1991-10-14
|
5KB
|
192 lines
#
# Makefile for itrans $Header: e:/itrans/src/rcs/makefile.gcc 1.3 91/10/14 20:29:09 avinash Exp $
#
# To be used for the GNU C compiler, using DJDelorie's G++ port to the
# 80x386 machines.
# change all defines as required.
#SHELL=/bin/sh # use this defn on a unix machine
SHELL= # use this defn on a pc
#######
# Note that a shell environment variable has to be defined, called
# ITRANSPATH.
# A sample value for it is:
# ITRANSPATH=$(HEADERPATH):$(TFMDIR), where HEADERPATH and TFMDIR
# will be defined further down in this makefile....
#######
#######
# If you do not have a compiler that understands new-style function
# declarators, make the "noansi" object, instead of "itrans" or "all".
# IMPORTANT: Also, make the variable PROTO be null.
#######
# for SYSV (and friends which use <string.h> instead of <strings.h>)
# define the c-compiler flag
# (add -DMSDOS for 80x86 PC systems (IBM Compatible))
SYS = -DSYSV -DMSDOS
# if your C compiler understands prototypes, define PROTO_C,
# else keep PROTO null
# PROTO =
PROTO=-DPROTO_C=1
# where the installed binary goes
# BINDIR = /usr1/avinash/ITRANS/bin
BINDIR = /usr1/avinash/ITRANS/bin
# where the TFM, and IFM files go
# TFMDIR = /usr/lib/tex/fonts/tfm
TFMDIR=/usr1/avinash/ITRANS/lib
# where the header PS files go
# HEADERDIR = /usr/lib/tex/ps
HEADERDIR = /usr1/avinash/ITRANS/lib
# where the manual page goes
# MANDIR = /usr/local/text/man/man1
MANEXT = 1
MANDIR = /usr1/avinash/ITRANS/doc
# code optimizer
# either use
# OPT = -O2
# OPT = -g
OPT =
# libraries to include (-ll -lm -lc on most systems)
# Note, if you do not have lex/yacc on your system, turn off the
# -ll flag. You will also need to modify the dependencies of
# ilex.o and iyacc.o, check out the comments further down this file
# (look for ilex.o and iyacc.o)
# FLIBS= -lmalloc -ll -lm -lc # Use this for SGI machines
# FLIBS= -lm -lc # Use this for machines missing lex/yacc tools
# FLIBS= -lm -lc
FLIBS= -lflex -lm -lc # PC related...
# C flags to use:
# SGI: -acpp use ANSI C prepreocessor, -prototypes, honor prototypes.
# CFLAGS = -acpp -prototypes $(OPT) $(SYS) $(PROTO)
CFLAGS = $(OPT) $(SYS) $(PROTO)
CC=gcc
# Yacc flags:
YFLAGS= -d
###
SRC = iyacc.y \
itrans.c \
ilex.l \
lang.c \
font.c \
pifm.c \
ichar.c \
itotex.c \
itops.c \
utils.c
OBJ = iyacc.o \
itrans.o \
ilex.o \
lang.o \
font.o \
pifm.o \
ichar.o \
itotex.o \
itops.o \
utils.o
HEADERFILES = devnac.ps itrans.pro
FILES =
.c.o:
$(CC) -c $(CFLAGS) $<
all : itrans.exe
itrans.exe : $(OBJ)
$(CC) $(OBJ) $(LIBS) $(FLIBS) -o itrans
copy /b d:\djg\bin\stub.exe+itrans itrans.exe
del itrans
$(OBJ) : itrans.h imap.h ifm.h
# .l.c:;
# If you do not have lex on your system, uncomment the following
# four lines (you may leave the .l.c line above as it is)
# Also, comment out the ilex.c that follows this defn (the PC related stuff).
# (it may already be commented....)
#---
# ilex.o : ilex.c ytab.h
# $(CC) -c $(CFLAGS) -DNOLEX ilex.c
# ilex.c : lexyyc
# cp lexyyc ilex.c
# PC related stuff
ilex.c : ilex.l
flex ilex.l
mv lexyy.c ilex.c
# .y.c:;
# If you do not have yacc on your system, uncomment the following
# four lines (you may leave the .y.c:; line above as it is).
# Also, comment out the iyacc.c that follows this defn (the PC related stuff).
# (it may already be commented....)
#---
# iyacc.o : iyacc.c
# $(CC) -c $(CFLAGS) iyacc.c
# iyacc.c : ytabc
# cp ytabc iyacc.c
# PC related stuff
iyacc.c : iyacc.y
bison -yd iyacc.y
mv y_tab.c iyacc.c
# When making noansi, make sure PROTO is null
noansi : deansify.exe $(SRC)
$(SHELL) dodeans
touch noansi
echo "Make sure the variable PROTO <$(PROTO)> is NULL in the Makefile!"
make all
deansify.exe: deansify.c
$(CC) $(CFLAGS) deansify.c -o deansify
copy /b d:\djg\bin\stub.exe+deansify deansify.exe
del deansify
install : all
-mkdir $(BINDIR)
-mkdir $(HEADERDIR)
-mkdir $(MANDIR)
cp itrans $(BINDIR)/itrans
cp prips $(BINDIR)/prips
-cp ../lib/itrans.pro $(HEADERDIR)
-cp ../lib/devnac.ps $(HEADERDIR)
-cp ../lib/devnac.ifm $(TFMDIR)
-cp ../lib/devnac.afm $(TFMDIR)
-cp ../lib/dnh.tfm $(TFMDIR)
-cp ../lib/dnho.tfm $(TFMDIR)
-cp ../lib/dnhrc.tfm $(TFMDIR)
-cp ../lib/dnhre.tfm $(TFMDIR)
-chmod +w $(MANDIR)/itrans.$(MANEXT)
-cp itrans.1 $(MANDIR)/itrans.$(MANEXT)
-chmod -w $(MANDIR)/itrans.$(MANEXT)
-(cd $(MANDIR); nroff -man itrans.$(MANEXT) > itrans.man)
-chmod +w $(MANDIR)/prips.$(MANEXT)
-cp prips.1 $(MANDIR)/prips.$(MANEXT)
-chmod -w $(MANDIR)/prips.$(MANEXT)
-(cd $(MANDIR); nroff -man prips.$(MANEXT) > prips.man)
@echo
@echo "****** Note: There may be error messages printed when installing,"
@echo "****** most of them will be harmless---directories already existing, or "
@echo "****** copying a file onto itself."
clean :
rm -f *.o *.log